﻿using Ninject.Modules;
using PCE.Core;
using PCE.Data;
using PCE.Data.NH;
using PCE.Domain;

namespace PCE.Configuration.IoC.Modules
{
	public class CustomerModule : NinjectModule
	{
		public override void Load()
		{
			Bind<ICustomerRegistrator>()
				.To<CustomerRegistrator>();

			Bind<IRepository<Customer, int>>()
				.To<NHibernateRepository<Customer, int>>()
				.InSingletonScope();

			Bind<IRepository<Tender, int>>()
				.To<NHibernateRepository<Tender, int>>()
				.InSingletonScope();
		}
	}
}